/PROG  PNS0058
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "53322606";
PROG_SIZE	= 3500;
CREATE		= DATE 15-08-11  TIME 19:38:24;
MODIFIED	= DATE 25-04-29  TIME 18:29:08;
FILE_NAME	= PNS0019;
VERSION		= 0;
LINE_COUNT	= 121;
MEMORY_SIZE	= 3952;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R23 ;
   6:  !  PROGRAM: PNS0058 ;
   7:  !  PART:53322606 ;
   8:  !ZYL15-8-11********************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  OVERRIDE=20% ;
  12:  MOVE TO HOME    ;
  13:  R[14]=90    ;
  14:  R[18]=1    ;
  15:  R[19]=.2    ;
  16:   ;
  17:  !------------------------------- ;
  18:  !BEGINNING OF PROGRAM ;
  19:  CALL PARTDROP    ;
  20:  COL GUARD ADJUST R[14] ;
  21:  UTOOL_NUM=1 ;
  22:  UFRAME_NUM=0 ;
  23:  PAYLOAD[3] ;
  24:  R[5]=10    ;
  25:  OVERRIDE=R[5] ;
  26:  !INITIATE TO PICK-POUNCE ;
  27:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  28:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  29:  PAUSE ;
  30:  R[1]=0    ;
  31:  TIMER[1]=RESET ;
  32:  TIMER[1]=START ;
  33:   ;
  34:  LBL[10:TOP OF LOOF] ;
  35:  OVERRIDE=R[5] ;
  36:   ;
  37:  TIMER[3]=STOP ;
  38:  TIMER[2]=STOP ;
  39:  R[1]=R[1]+1    ;
  40:  R[2]=TIMER[2]    ;
  41:  R[3]=60/R[2]    ;
  42:  R[8]=TIMER[3]    ;
  43:  TIMER[2]=RESET ;
  44:  TIMER[2]=START ;
  45:  TIMER[3]=RESET ;
  46:   ;
  47:  !PROCEED TO PICK ;
  48:  LBL[20] ;
  49:  IF DI[1]=ON AND DI[3]=ON AND DI[8]=ON,JMP LBL[25] ;
  50:  IF DI[29]=ON,JMP LBL[90] ;
  51:  JMP LBL[20] ;
  52:   ;
  53:  LBL[25] ;
  54:  WAIT DI[1]=ON AND DI[3]=ON AND DI[8]=ON    ;
  55:  TIMER[3]=START ;
  56:  R[5]=100    ;
  57:  OVERRIDE=R[5] ;
  58:J P[3:PICK APPROACH] 90% CNT60 ACC100    ;
  59:   ;
  60:J P[4:PICK] 90% CNT0 TB R[18]sec,CALL PARTPICK ACC100    ;
  61:  PAYLOAD[4] ;
  62:  CALL CHK_PICK    ;
  63:  MONITOR Z_CHECH ;
  64:J P[5:PICK DEPART] 90% CNT50 ACC100    ;
  65:  DO[8]=PULSE,0.5sec ;
  66:  LBL[27] ;
  67:  CALL CHECKPICK    ;
  68:  IF DI[9]=OFF OR DI[11]=OFF,JMP LBL[27] ;
  69:L P[6:SNEAK] 3000mm/sec CNT100    ;
  70:  DO[5]=PULSE,1.0sec ;
  71:J P[7:PICK CLEAR] 100% CNT60 ACC100    ;
  72:  LBL[30:GOTO DROP POUNCE] ;
  73:J P[8:DROP POUNCE] 100% CNT100 ACC100 BREAK    ;
  74:  TIMER[3]=STOP ;
  75:  LBL[40:AT DROP POUNCE] ;
  76:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  77:  IF DI[7]=ON AND DI[2]=ON,JMP LBL[50] ;
  78:  IF DI[18]=ON,JMP LBL[60] ;
  79:  JMP LBL[40] ;
  80:   ;
  81:  LBL[50:MOVE DROP SNEAK] ;
  82:  TIMER[3]=START ;
  83:  OVERRIDE=R[5] ;
  84:J P[9:DROP SNEAK] 80% CNT100 ACC100 BREAK    ;
  85:  LBL[51:DROP OR C-P-S] ;
  86:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  87:  IF DI[18]=ON,JMP LBL[40] ;
  88:  JMP LBL[51] ;
  89:  JMP LBL[50] ;
  90:   ;
  91:  LBL[60:MOVE CLS-PRS-ACC] ;
  92:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  93:  PAUSE ;
  94:  JMP LBL[30] ;
  95:   ;
  96:  LBL[80:DROP ENABLED] ;
  97:  !PROCEED TO DROP ;
  98:  TIMER[3]=START ;
  99:  OVERRIDE=R[5] ;
 100:J P[14:DROP LIMIT] 80% CNT100    ;
 101:L P[10:DROP APPROACH] 3000mm/sec CNT70 ACC100    ;
 102:  MONITOR END Z_CHECH ;
 103:J P[11:DROP] 90% CNT5 TB R[19]sec,CALL PARTDROP ACC100    ;
 104:  DO[6]=PULSE,1.0sec ;
 105:  PAYLOAD[3] ;
 106:  CALL CHK_DROP    ;
 107:   ;
 108:J P[12:DROP DEPART] 100% CNT100 ACC110 TA    .04sec,DO[7]=PULSE,1.0sec    ;
 109:J P[13:DROP CLEAR] 100% CNT100 ACC110    ;
 110:  !GOTO PICK POUNCE ;
 111:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 112:  IF DI[29]=ON,JMP LBL[90] ;
 113:  JMP LBL[10] ;
 114:   ;
 115:  LBL[90:END OF CYCLE] ;
 116:  TIMER[1]=STOP ;
 117:  R[4]=TIMER[1]    ;
 118:J P[1:MIDDLE] 50% CNT100    ;
 119:  MOVE TO HOME    ;
 120:   ;
 121:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.456  mm,	Y =     -.007  mm,	Z =  -988.000  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2929.001  mm,	Y =  1415.774  mm,	Z = -1047.257  mm,
	W =  -179.649 deg,	P =     -.020 deg,	R =   100.337 deg,
	E1=   109.596 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2590.032  mm,	Y =  3297.614  mm,	Z = -1017.306  mm,
	W =   179.794 deg,	P =     -.948 deg,	R =    88.527 deg,
	E1=   104.867 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2590.032  mm,	Y =  3297.615  mm,	Z = -1200.184  mm,
	W =   179.794 deg,	P =     -.948 deg,	R =    88.527 deg,
	E1=   104.867 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2590.033  mm,	Y =  3297.615  mm,	Z =  -947.706  mm,
	W =   179.794 deg,	P =     -.948 deg,	R =    88.527 deg,
	E1=   104.867 deg
};
P[6:"SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2709.282  mm,	Y =  2216.173  mm,	Z =  -949.226  mm,
	W =   179.341 deg,	P =    -5.104 deg,	R =    88.473 deg,
	E1=   104.863 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  1918.892  mm,	Y =  1340.401  mm,	Z = -1050.187  mm,
	W =   176.817 deg,	P =      .149 deg,	R =   140.405 deg,
	E1=   111.871 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2002.932  mm,	Y =  -778.219  mm,	Z = -1048.854  mm,
	W =  -176.470 deg,	P =     1.346 deg,	R =  -150.049 deg,
	E1=   121.331 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2677.603  mm,	Y = -1708.869  mm,	Z =  -910.459  mm,
	W =  -175.482 deg,	P =    -3.954 deg,	R =  -112.476 deg,
	E1=   126.520 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2677.605  mm,	Y = -3308.975  mm,	Z =  -890.856  mm,
	W =  -169.373 deg,	P =    -3.868 deg,	R =   -91.023 deg,
	E1=   103.466 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2677.603  mm,	Y = -3308.975  mm,	Z = -1121.656  mm,
	W =  -169.373 deg,	P =    -3.868 deg,	R =   -91.023 deg,
	E1=   103.466 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2677.606  mm,	Y = -3308.975  mm,	Z =  -899.255  mm,
	W =  -169.373 deg,	P =    -3.868 deg,	R =   -91.023 deg,
	E1=   103.466 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2005.414  mm,	Y =  -779.344  mm,	Z = -1041.343  mm,
	W =  -179.096 deg,	P =     1.130 deg,	R =  -164.540 deg,
	E1=   105.634 deg
};
P[14:"DROP LIMIT"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2677.603  mm,	Y = -1708.869  mm,	Z =  -910.459  mm,
	W =  -175.482 deg,	P =    -3.954 deg,	R =  -112.476 deg,
	E1=   126.520 deg
};
/END
